1. Field of the Invention
The field of the invention is data processing, or, more specifically, methods, apparatus, and products for compiling source code for debugging and debugging such compiled source code.
2. Description of Related Art
The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely complicated devices. Today's computers are much more sophisticated than early systems such as the EDVAC. Computer systems typically include a combination of hardware and software components, application programs, operating systems, processors, buses, memory, input/output devices, and so on. As advances in semiconductor processing and computer architecture push the performance of the computer higher and higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
As computer systems evolve, software applications also evolve. Applications are increasingly more complex and computationally powerful. Such applications may be cumbersome in execution. To reduce the complexity of executing such applications, optimizing compilers are used to compile source code of an application into machine executable instructions while tuning or optimizing portions of the application. Such optimizations may be directed to minimize or maximize some attributes of the executable computer program. For example, an optimizing compiler may attempt to minimize the time needed to execute a program or to minimize the amount of memory used during execution. The optimizing compiler makes these changes by removing, rearranging, simplifying, or modifying the original source code instructions.
When an optimizing compiler compiles source code for debugging, the optimized portions of the source code are often removed from a debugger's scope given that the original source code instructions viewed by the debugger may not directly correspond to the same machine instructions generated by the optimizing compiler. That is, optimized portions of the application are generally not debuggable. To indicate to a debugger the portions of the source code which are debuggable, the optimizing compiler may insert a snapshot. A snapshot, as the term is used in this specification, is a directive and a specification of one or more variables, where the directive enables a user of a debugger to establish a breakpoint in a debug session at the location of the snapshot and to examine the specified variables when program execution reaches the snapshot location. Such snapshots, when inserted by an optimizing compiler, are inserted without any regard to a debug user's preference.